/*
 * @Author: Janssen000908 2601566046@qq.com
 * @Date: 2025-03-31 17:38:40
 * @LastEditors: Janssen000908 2601566046@qq.com
 * @LastEditTime: 2025-03-31 18:38:09
 * @FilePath: /linux_-demo/learn28/client.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

#include "comm.hpp"
using namespace std;

int main()
{
    int fd = open(FIFO_FILE,O_WRONLY);
    if(fd < 0)
    {
        perror("open");
        exit(FIFO_OPEN_ERR);
    }

    string s;
    while(true)
    {
        cout << "Enter@:";
        getline(cin,s);
        write(fd,s.c_str(),s.size());
    }
    return 0;
}